<template>
    <div class="header_status">
        <header class="mui-bar mui-bar-nav">
            <a class=" mui-icon  mui-pull-left arr_left" @tap="page_back" v-show="$store.state.common.header_back_btn">
            
            </a>

            <h1 class="mui-title" >{{$store.state.common.header_text}}</h1>
            <a class="mui-pull-right" v-show="$store.state.common.header_right_func" @tap="header_func" v-html="$store.state.common.header_right_html"></a>
        </header>


    </div>
</template>
<script>
export default {
    name:'header_status',
    methods:{
        page_back(){
            this.$router.go(-1)
        },
        
        header_func(){
            // 父组件绑定事件 自定义事件 header_func 子组件点击后触发 自定义事件即可
            if(this.$store.state.common.header_right_func){
                this.$emit('header_func',''); //第二个是参数
            }else{
                console.log("未定义方法")
            }
           
        }
    },
    mounted(){
        console.log(this.$store.state.common.header_back_btn)
    }
}
</script>
<style lang="less" scoped>
.mui-content{
    height: 100%;
}
.mui-bar-nav a{
    font-size: 0.5973rem;
    color: #888888;
    line-height: 44px;
}
</style>
